/*
 *    This file is part of CeluMap.
 *
 *    CeluMap is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU Lesser General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    CeluMap is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *    Copyright 2006, 2007, 2008 Gonzalo Merayo
 *    gonzalo (at) celumap.com.ar
 *    www.celumap.com.ar
 *
 */

package screen;

import image.GisImage;

import javax.microedition.lcdui.Graphics;

import font.Font;
import geometry.Rectangle;

public class ScreenGraphics implements GisGraphics {

	protected Graphics g = null;
	protected static Font font=null;

	public ScreenGraphics() {
		if(font == null){
			font = new Font();
			/*try {
				ResourceGetter r = new ResourceGetter();
				//font.load(new DataInputStream(r.getResource("font.font")));
			} catch (IOException e) {
				e.printStackTrace();
			}*/
		}
	}
	
	public void setGraphics(Graphics g){
		this.g = g;
	}

	public void clear(Rectangle area) {
		// TODO Auto-generated method stub

	}

	public void drawLine(int arg0, int arg1, int arg2, int arg3) {
		g.drawLine(arg0, arg1, arg2, arg3);
	}

	public void fill(int[] x, int[] y, int l) {
		// TODO Auto-generated method stub

	}

	public void image(GisImage im, int x, int y, int i) {
		// TODO Auto-generated method stub

	}

	public void setColor(byte color) {
		g.setColor(color);
	}

	public void setThickness(int thickness) {
		// TODO Auto-generated method stub

	}

	public void drawString(byte[] str, int xi, int yi, int dx, int dy) {
		font.drawString(str, this, xi, yi, dx, dy);
	}

}
